package com.ruoyi.project.tool.bcrypt;


import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class BcryptTest {
    public static void main(String[] args) {
        //用户密码
        String password = "5Mjilpnp4fAyy4jLok2vAIMMGh1beKKk";
        String password2 = "W-W6JNOr3A";
        //密码加密
        BCryptPasswordEncoder passwordEncoder=new BCryptPasswordEncoder();
        //加密
        String newPassword = passwordEncoder.encode(password2);
        System.out.println("加密密码为："+newPassword);
        //对比这两个密码是否是同一个密码
        boolean matches = passwordEncoder.matches(password2, newPassword);
        System.out.println("两个密码一致:"+matches);

        List<String> list = new ArrayList<String>();
        list.add("1");
        list.add("2");
        list.add("3");
//        list = list.stream().filter(e -> e.equals("1")).collect(Collectors.toList());
//        Map<String, List<String>> towerIdMap = list.stream().collect(Collectors.c);
//        System.out.println(towerIdMap);
    }
}
